home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / vbmbox / msgbox.bas < prev    next >
BASIC Source File  |  1995-02-09  |  3KB  |  57 lines

  1. Option Explicit
  2.  
  3. Type MBValue
  4.   Buttons As Integer
  5.   Icon As Integer
  6.   Modal As Integer
  7.   DefButton As Integer
  8.   Ret As Integer
  9. End Type
  10.  
  11. ' Function Parameters
  12. ' MsgBox parameters
  13. Global Const MB_OK = 0                 ' OK button only
  14. Global Const MB_OKCANCEL = 1           ' OK and Cancel buttons
  15. Global Const MB_ABORTRETRYIGNORE = 2   ' Abort, Retry, and Ignore buttons
  16. Global Const MB_YESNOCANCEL = 3        ' Yes, No, and Cancel buttons
  17. Global Const MB_YESNO = 4              ' Yes and No buttons
  18. Global Const MB_RETRYCANCEL = 5        ' Retry and Cancel buttons
  19.  
  20. Global Const MB_ICONSTOP = 16          ' Critical message
  21. Global Const MB_ICONQUESTION = 32      ' Warning query
  22. Global Const MB_ICONEXCLAMATION = 48   ' Warning message
  23. Global Const MB_ICONINFORMATION = 64   ' Information message
  24.  
  25. Global Const MB_APPLMODAL = 0          ' Application Modal Message Box
  26. Global Const MB_DEFBUTTON1 = 0         ' First button is default
  27. Global Const MB_DEFBUTTON2 = 256       ' Second button is default
  28. Global Const MB_DEFBUTTON3 = 512       ' Third button is default
  29. Global Const MB_SYSTEMMODAL = 4096     ' System Modal
  30.  
  31. ' MsgBox return values
  32. Global Const IDOK = 1                  ' OK button pressed
  33. Global Const IDCANCEL = 2              ' Cancel button pressed
  34. Global Const IDABORT = 3               ' Abort button pressed
  35. Global Const IDRETRY = 4               ' Retry button pressed
  36. Global Const IDIGNORE = 5              ' Ignore button pressed
  37. Global Const IDYES = 6                 ' Yes button pressed
  38. Global Const IDNO = 7                  ' No button pressed
  39.  
  40.  
  41. 'Declare Function SendMessage Lib "user" (ByVal hWd%, ByVal wMsg%, ByVal Param%, ByVal lParam&) As Long
  42. Declare Function SendMessage Lib "user" (ByVal hWd%, ByVal wMsg%, ByVal Param%, lParam As Any) As Long
  43. Global Const WM_USER = &H400
  44. Global Const EM_LINELENGTH = WM_USER + 17
  45. Global Const EM_GETLINECOUNT = WM_USER + 10
  46.  
  47. Declare Function PostMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Integer
  48. Declare Function IsIconic Lib "user" (ByVal hWnd As Integer) As Integer
  49. 'Declare Function GetActiveWindow Lib "User" () As Integer
  50.  
  51. Declare Function FindWindow Lib "User" (ByVal lpClassName As Any, ByVal lpWindowName As Any) As Integer
  52. 'Declare Function WinExec Lib "Kernel" (ByVal lpCmdLine As String, ByVal nCmdShow As Integer) As Integer
  53.  
  54. Declare Function GetClassName Lib "User" (ByVal hWnd As Integer, ByVal lpClassName As String, ByVal nMaxCount As Integer) As Integer
  55. Declare Function SetFocusAPI Lib "User" Alias "SetFocus" (ByVal hWnd As Integer) As Integer
  56.  
  57.